package com.dtt.learning.repository;

import com.dtt.learning.model.Article;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * Created by daitiantian on 2018/4/19.
 */
public interface ArticleRepository extends JpaRepository<Article, Integer> {

    List<Article> findByAuthorName(String authorName);

    List<Article> findByMakeIdNotNull();

    Article findByArticleId(int artId);

    long countByAuthorName(String authorName);





}
